﻿<Page x:Class="BlackjackBot.Wpf.Pages.VisualizerPage"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
      xmlns:controls="clr-namespace:BlackjackBot.Wpf.Controls"
      mc:Ignorable="d" 
	Loaded="Page_Loaded"
	Height="1000" Width="1366" 
	Title="SoloPage">

	<Grid Margin="10,0,4,0">
		<Grid.ColumnDefinitions>
			<ColumnDefinition Width="*"/>
			<ColumnDefinition Width="408"/>
		</Grid.ColumnDefinitions>

		<Grid.RowDefinitions>
			<RowDefinition Height="72"/>
			<RowDefinition Height="550" />
			<RowDefinition Height="*" />
		</Grid.RowDefinitions>



		<Grid Grid.Column="0" Grid.Row="0">
			<Button Grid.Column="0"  Grid.Row="0" Width="53"  HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0,16,0,0" Style="{DynamicResource btnGoBack}" x:Name="Back" Click="Back_Click"/>
			<Image Grid.Column="1"  Grid.Row="0" Source="/Images/Title-PlayerPage.png" Stretch="None" HorizontalAlignment="Left" Margin="60,24,0,0" VerticalAlignment="Top" />
			<Grid Grid.Column="2"  Grid.Row="0" HorizontalAlignment="Right"  VerticalAlignment="Bottom" Margin="0,0,50,0" Width="auto">
				<Image Source="/Images/GameCountBackground.png" Stretch="None" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,-3,0,3"  />
				<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Bottom" Margin="0,0,0,4">
					<Button Height="32" Style="{DynamicResource btnGoBack}" Click="PrevGame_Click"/>
					<Label FontFamily="Century" FontSize="22" Style="{StaticResource PrimaryText}">Game</Label>
					<Label Name="GameNumber" Content="{Binding GameNumber, FallbackValue=0}" FontFamily="Century" FontSize="22"  Style="{StaticResource PrimaryText}"/>
					<Label FontFamily="Century" FontSize="22" Style="{StaticResource PrimaryText}">of</Label>
					<Label Name="TotalGames" Content="{Binding TotalGames, FallbackValue=0}" FontFamily="Century" FontSize="22"  Style="{StaticResource PrimaryText}"/>
					<Button Height="32" Style="{DynamicResource btnGoFwd}" Click="NextGame_Click"/>
				</StackPanel>
			</Grid>
		</Grid>

		<Grid Grid.Column="0"  Grid.Row="1" >
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="12"/>
				<ColumnDefinition Width="*"/>
				<ColumnDefinition Width="12"/>
			</Grid.ColumnDefinitions>

			<Grid.RowDefinitions>
				<RowDefinition Height="12"/>
				<RowDefinition Height="512" />
				<RowDefinition Height="12" />
			</Grid.RowDefinitions>

			<Image Grid.Column="0"  Grid.Row="0"  Source="/Images/frame-tl.png" Stretch="Fill" />
			<Image Grid.Column="1"  Grid.Row="0"  Source="/Images/frame-top.png" Stretch="Fill" />
			<Image Grid.Column="2"  Grid.Row="0"  Source="/Images/frame-tr.png" Stretch="Fill" />
			<Image Grid.Column="0"  Grid.Row="1"  Source="/Images/frame-left.png" Stretch="Fill" />
			<Image Grid.Column="1"  Grid.Row="1"  Source="/Images/CardTableBg.png" Stretch="Fill" />
			<Image Grid.Column="2"  Grid.Row="1"  Source="/Images/frame-right.png" Stretch="Fill" />
			<Image Grid.Column="0"  Grid.Row="2"  Source="/Images/frame-bl.png" Stretch="Fill" />
			<Image Grid.Column="1"  Grid.Row="2"  Source="/Images/frame-bottom.png" Stretch="Fill" />
			<Image Grid.Column="2"  Grid.Row="2"  Source="/Images/frame-br.png" Stretch="Fill" />

			<Grid  Grid.Column="1" Grid.Row="1" >
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="auto"/>
					<ColumnDefinition Width="*"/>
				</Grid.ColumnDefinitions>

				<Grid.RowDefinitions>
					<RowDefinition Height="34"/>
					<RowDefinition Height="*"/>
				</Grid.RowDefinitions>

				<Grid  Grid.ColumnSpan="2"  Style="{StaticResource HeaderTextBg}">
					<Grid.ColumnDefinitions>
						<ColumnDefinition Width="130"/>
						<ColumnDefinition Width="80"/>
						<ColumnDefinition Width="430"/>
						<ColumnDefinition Width="10"/>
						<ColumnDefinition Width="100"/>
						<ColumnDefinition Width="50"/>
						<ColumnDefinition Width="50"/>
						<ColumnDefinition Width="50"/>
					</Grid.ColumnDefinitions>

					<TextBlock Grid.Column="0" Style="{StaticResource HeaderText}">Bot</TextBlock>
					<TextBlock Grid.Column="1" Style="{StaticResource HeaderText}">Bet</TextBlock>
					<TextBlock Grid.Column="2" Style="{StaticResource HeaderText}"></TextBlock>
					<TextBlock Grid.Column="3" Style="{StaticResource HeaderText}"></TextBlock>
					<TextBlock Grid.Column="4" Style="{StaticResource HeaderText}">Bank</TextBlock>
					<TextBlock Grid.Column="5" Style="{StaticResource HeaderText}">Win</TextBlock>
					<TextBlock Grid.Column="6" Style="{StaticResource HeaderText}">Lose</TextBlock>
					<TextBlock Grid.Column="7" Style="{StaticResource HeaderText}">Push</TextBlock>
				</Grid>

				<controls:GameControl x:Name="PlayerList" Grid.Column="0" Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Top"/>
			</Grid>
			<Image Grid.Column="1"  Grid.Row="1"  Source="/Images/VerticalPower.png" Stretch="None" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,34,-49,0" />

		</Grid>

		<StackPanel Grid.Column="0" Grid.Row="2"  Orientation="Vertical">
			<Button Style="{DynamicResource RunButton}" x:Name="RunGame" Click="RunGame_Click" IsEnabled="False"/>

			<Grid>
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="12"/>
					<ColumnDefinition Width="*"/>
					<ColumnDefinition Width="12"/>
				</Grid.ColumnDefinitions>

				<Grid.RowDefinitions>
					<RowDefinition Height="12"/>
					<RowDefinition Height="210" />
					<RowDefinition Height="12" />
				</Grid.RowDefinitions>

				<Image Grid.Column="0"  Grid.Row="0"  Source="/Images/frame-tl.png" Stretch="Fill" />
				<Image Grid.Column="1"  Grid.Row="0"  Source="/Images/frame-top.png" Stretch="Fill" />
				<Image Grid.Column="2"  Grid.Row="0"  Source="/Images/frame-tr.png" Stretch="Fill" />
				<Image Grid.Column="0"  Grid.Row="1"  Source="/Images/frame-left.png" Stretch="Fill" />
				<Image Grid.Column="1"  Grid.Row="1"  Source="/Images/CardTableBg.png" Stretch="Fill" />
				<Image Grid.Column="2"  Grid.Row="1"  Source="/Images/frame-right.png" Stretch="Fill" />
				<Image Grid.Column="0"  Grid.Row="2"  Source="/Images/frame-bl.png" Stretch="Fill" />
				<Image Grid.Column="1"  Grid.Row="2"  Source="/Images/frame-bottom.png" Stretch="Fill" />
				<Image Grid.Column="2"  Grid.Row="2"  Source="/Images/frame-br.png" Stretch="Fill" />


				<Grid  Grid.Column="1" Grid.Row="1" >
					<Grid.ColumnDefinitions>
						<ColumnDefinition Width="*"/>
					</Grid.ColumnDefinitions>

					<Grid.RowDefinitions>
						<RowDefinition Height="34"/>
						<RowDefinition Height="*"/>
					</Grid.RowDefinitions>

					<Grid Grid.Row="0" Style="{StaticResource HeaderTextBg}">
						<Grid.ColumnDefinitions>
							<ColumnDefinition Width="140"/>
							<ColumnDefinition Width="*"/>
						</Grid.ColumnDefinitions>

						<TextBlock Grid.Column="0" Style="{StaticResource HeaderText}">Debug Log</TextBlock>
						<TextBlock Grid.Column="1" Style="{StaticResource HeaderText}"><Hyperlink x:Name="ViewGameLog" Foreground="#FFCA2800" Click="ViewGameLog_Click">View game log</Hyperlink></TextBlock>
					</Grid>

					<controls:ConsoleControl x:Name="ConsoleOutput" Grid.Column="0" Grid.Row="1" />
				</Grid>

			</Grid>
		</StackPanel>
		<controls:TournamentResults x:Name="Leaderboard" Grid.Column="1" Grid.Row="0" Grid.RowSpan="3" Margin="3,0,0,32"/>
	</Grid>

</Page>
